{include file="pub_header.htm"}

<div class="out_table">
<table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
  <tr>
    <td align="left" nowrap>&nbsp;
      <a href="{$lang.s._public.global.weburl}" target="_self" class="current_place">{$lang.s._public.global.website}</a>
      &raquo; <a href="{$control_index}?act=index" target="_self" class="current_place">论坛首页</a>
      {foreach name=channel_current from=$channel_current item=channel_current}
      &raquo; <a href="{$control_index}?act=channel&channel_id={$channel_current.id}" target="_self" class="current_place">{$channel_current.name|str_entag:'space,br'}</a>
      {/foreach}
      &raquo; <a href="{$control_index}?act=post&channel_id={$channel_info.id}" target="_self" class="current_place">发帖</a>
    </td>
    <td align="right" nowrap>&nbsp;</td>
  </tr>
</table>
</div>

<div class="out_table"><div class="space"></div></div>
<div class="out_table">
<form id="form_post" name="form_post" method="post" action="javascript:void(null);" enctype="multipart/form-data">
<table width="98%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
  <tr align="left" class="block_header">
    <td colspan="2">发表新主题</td>
  </tr>
  <tr>
    <td width="20%" align="right" class="block_left">帖子图标:</td>
    <td width="80%" class="block_right">
      {foreach name=icon_topic_list from=$icon_topic_list item=item}
      <input type="radio" id="icon" name="icon" value="{$item.id}">&nbsp;<img src="images/icon_topic/{$item.filename}" border="0" align="absmiddle" />&nbsp;
      {if $smarty.foreach.icon_topic_list.iteration%10 == 0}<br />{/if}
      {/foreach}
      <input type="radio" id="icon" name="icon" value="0" checked /> 无
      <span id="icon_return"><span class="prompt_primal"></span></span>
    </td>
  </tr>
  <tr>
    <td class="block_left">帖子标题:</td>
    <td class="block_right">
      {foreach name=trans_group_list from=$trans_list item=trans_group}
      <select id="trans[{$trans_group.id}]" name="trans[{$trans_group.id}]" class="select" />
        <option value="">{$trans_group.name|str_entag:'space,br'}</option>
        {foreach name=trans_list from=$trans_group.trans item=trans}
        <option value="{$trans.id}">{$trans.name|str_entag:'space,br'}</option>
        {/foreach}
      </select>
      {/foreach}
      <input type="text" name="subject" size="80" maxlength="255" class="input">
      <span id="subject_return"><span class="prompt_primal"></span></span>
    </td>
  </tr>
  <tr>
    <td class="block_left">帖子内容:</td>
    <td class="block_right">
      {assign var="content_value" value=""}
      {assign var="content_rows" value="15"}
      {assign var="content_cols" value="120"}
      {include file="pub_content_editor.htm"}
      <span id="content_return"><span class="prompt_primal"></span></span>
    </td>
  </tr>
  <tr>
    <td class="block_left" valign="top"><br />附件上传</td>
    <td class="block_right">
    <table width="90%" border="0" cellspacing="0" cellpadding="1" bgcolor="#FDF4E3">
      <tr>
        <td colspan="6" align="left">
          允许的文件类型:[{$setting_attach.type|implode_str:"|"}]
        </td>
      </tr>
      <tr>
        <td width="5%" rowspan="2" align="center"><b>描<br />述</b></td>
        <td width="25%" rowspan="2" align="left"><textarea id="attach_brief" name="attach_brief" rows="2" cols="24" class="textarea"></textarea></td>
        <td width="5%" rowspan="2" align="center"><b>文<br />件</b></td>
        <td width="25%" align="left">
          <span id="attach_upload_input" name="attach_upload_input">
            <input type="file" id="attach_upload" name="attach_upload" size="12" style="width:140px;" class="input" />
          </span>
        </td>
        <td width="10%" align="left">
          <input type="button" id="attach_upload_submit" name="attach_upload_submit" value="本地上传" class="button" onclick="xajax.$('attach_upload_submit').disabled=true;xajax_upload_submit('form_post','{$control_index}?act=post&ope=saveattach_upload&channel_id={$channel_current.id}&post_id={$member.id}','attach_upload_prompt');">
        </td>
        <td width="30%" align="left">
          <span id="attach_upload_prompt" name="attach_upload_prompt"></span>
        </td>
      </tr>
      <tr>
        <td width="25%" align="left">
          <span id="attach_get_input" name="attach_get_input">
            <input type="text" id="attach_get" name="attach_get" size="24" style="width:140px;" class="input" />
          </span>
        </td>
        <td width="10%" align="left">
          <input type="button" id="attach_get_submit" name="attach_get_submit" value="地址获取" class="button" onclick="xajax.$('attach_get_submit').disabled=true;xajax_attach_get('add','{$member.id}','attach_get',attach_get.value,'attach_get_submit','attach_list','attach_brief',attach_brief.value,'attach_get_prompt');">
        </td>
        <td width="30%" align="left">
          <span id="attach_get_prompt" name="attach_get_prompt"></span>
        </td>
      </tr>
      <tr>
        <td colspan="6" align="left">
          <span id="attach_list" name="attach_list">{$attach_list_result}</span>
        </td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td class="block_left">发帖选项:</td>
    <td class="block_right">
      {if $channel_info.if_face == "1"}<input type="checkbox" id="if_face" name="if_face" value="1" class="checkbox" checked>允许识别表情符号<span id="if_face_return"><span class="prompt_primal"></span></span><br>{/if}
      {if $channel_info.if_bbcode == "1"}<input type="checkbox" id="if_bbcode" name="if_bbcode" value="1" class="checkbox" checked>允许识别BBCODE<span id="if_bbcode_return"><span class="prompt_primal"></span></span><br>{/if}
      {if $channel_info.if_url == "1"}<input type="checkbox" id="if_url" name="if_url" value="1" class="checkbox" checked>允许识别URL<span id="if_url_return"><span class="prompt_primal"></span></span><br>{/if}
      {if $channel_info.if_html == "1"}<input type="checkbox" id="if_html" name="if_html" value="1" class="checkbox" checked>允许解析HTML<span id="if_html_return"><span class="prompt_primal"></span></span><br>{/if}
    </td>
  </tr>
  <tr>
    <td colspan="2" align="center" class="block_footer">
        <input type="button" id="button_submit" name="button_submit" value="发表新帖" class="button"
        onclick="xajax.$('button_submit').disabled=true;
                 xajax.$('button_submit').value='请等待...';
                 xajax_submit_post(xajax.getFormValues('form_post'), 'button_submit');">
    </td>
  </tr>
</table>
</form>
</div>

{include file="pub_footer.htm"}
